package com.itheima.tliasbackend.exception;

/**
 * GlobalException
 *
 * @author liliudong
 * @version 1.0
 * @description
 * @date 2023/5/26 11:04
 */
public class GlobalException extends RuntimeException{

    private final String msg;
    private final Integer code;

    public GlobalException(String msg, Integer code) {
        this.msg = msg;
        this.code = code;
    }

    public GlobalException(String msg) {
        this.msg = msg;
        this.code = 0;
    }

    public String getMsg() {
        return msg;
    }

    public Integer getCode() {
        return code;
    }
}
